package com.shangqing.system.windinfomation.mapper;

import com.shangqing.system.droughtinformation.entity.City;
import com.shangqing.system.droughtinformation.entity.DroughtGrade;
import com.shangqing.system.droughtinformation.entity.Droughtinformation;
import com.shangqing.system.windinfomation.entity.WindGrade;
import com.shangqing.system.windinfomation.entity.WindWarning;
import com.shangqing.system.windinfomation.entity.Windinformation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.security.core.userdetails.User;

import java.util.List;

@Mapper()
public interface WindInformationMapper{
    /**
     * 获取大风的所有信息
     */
    @Select("select * from wind_all_infomation")
    List<Windinformation> selectAll();

    /**通过id获取大风等级*/
    @Select("select * from wind_grade where id=#{windGradeid}")
    WindGrade getWindGradeById(int id);

    /**通过id获取预警信息等级*/
    @Select("select * from wind_warning where id=#{windwarningid}")
    WindWarning getWindwarningByID(int id);

    /**获取地区*/
    @Select("select * from sys_city where id=#{id}")
    City getAllCity(int id);

    /**获取大风等级*/
    @Select("select * from wind_grade")
    List<WindGrade> getWindGrade();

    /**获取预警信息等级*/
    @Select("select * from wind_warning")
    List<WindWarning> getWindwarning();
}
